# -*- coding: utf-8 -*-

from kbasic import *
from ktest import *
from ksearch import *

import time

S=SemanticDB(DictSimilarity())
S.Add(knowledge_database)
v1 = Variable(B, 'v1', int_system)
v2 = Variable(B, 'v2', int_system)
mask = KRelation(be_friends, [v1,v2])

N = 10000

t1 = t = time.time()
for i in xrange(0,N):
    X = S.Search(mask)
print '\n'.join(map(str, S.Search(mask)))
print "Time:",time.time()-t

